package cn.com.controler.CommentView;

import cn.com.entity.CommentView;

import java.util.List;

public class CommentViewDAO {

    //查询全部
    public List<CommentView> getAll(){
        String str = "select e.CommentId,e.Username Zusername,user.Username Busername,e.CommentContent Content,e.CommentTime pltime from user,(SELECT comment.CommentId,user.Username,comment.CommentArtId,comment.CommentContent,comment.CommentTime from comment,user where CommentUserId = UserId)e where e.CommentArtId = user.userid;";
        Object []arr = new Object[]{};
        return CommentViewDAOTemplete.selectdata(str,arr);
    }
}
